package com.yc.service.xcx.user.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yc.dao.DaoSupport;
import com.yc.service.xcx.base.XCXBaseService;
import com.yc.service.xcx.user.ISessionManagerService;
import com.yc.util.PageData;

@Service("sessionManagerService")
public class SessionManagerService extends XCXBaseService implements ISessionManagerService {


	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**新增
	 * @param pd
	 * @throws Exception
	 */
	public void save(PageData pd)throws Exception{
		dao.save("XCXSessionManagerMapper.save", pd);
	}
	
	/**删除
	 * @param pd
	 * @throws Exception
	 */
	public void edit(PageData pd)throws Exception{
		dao.update("XCXSessionManagerMapper.edit", pd);
	}
	
	
	/**删除
	 * @param pd
	 * @throws Exception
	 */
	public void delete(PageData pd)throws Exception{
		dao.delete("XCXSessionManagerMapper.delete", pd);
	}
	
	/**通过id获取数据
	 * @param pd
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("XCXSessionManagerMapper.findById", pd);
	}
	
	/**通过id获取数据
	 * @param pd
	 * @throws Exception
	 */
	public PageData checkloginById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("XCXSessionManagerMapper.checkloginById", pd);
	}

	@Override
	public void deleteAll() throws Exception {
		// TODO Auto-generated method stub
		PageData pd = new PageData();
		dao.delete("XCXSessionManagerMapper.deleteAll",pd);
	}

	@Override
	public PageData findByOpenId(PageData pd) throws Exception {
		// TODO Auto-generated method stub
		return (PageData)dao.findForObject("XCXSessionManagerMapper.findByOpenId", pd);
	}
	


	
}
